// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** getTrafficForecastChart POST /api/traffic/forecast/chart */
export async function getTrafficForecastChartUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTrafficForecastChartUsingPOSTParams,
  body: API.TrafficForecastQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTrafficForecastChartVO>('/api/traffic/forecast/chart', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** getRealtimeTraffic GET /api/traffic/forecast/realtime */
export async function getRealtimeTrafficUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRealtimeTrafficUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListTrafficForecastVo>('/api/traffic/forecast/realtime', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getTrafficSummary GET /api/traffic/forecast/summary/${param0} */
export async function getTrafficSummaryUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTrafficSummaryUsingGETParams,
  options?: { [key: string]: any },
) {
  const { interfaceId: param0, ...queryParams } = params;
  return request<API.BaseResponseTrafficSummary>(`/api/traffic/forecast/summary/${param0}`, {
    method: 'GET',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}

/** getTopForecastInterfaces GET /api/traffic/forecast/top */
export async function getTopForecastInterfacesUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTopForecastInterfacesUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListTrafficForecastVo>('/api/traffic/forecast/top', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
